using System;
using System.Collections.Generic;

namespace XmlObjects
{
	public class AttributeHelper
	{
		public static IList<T> GetAttributes<T>(Type type, bool inherit)
		{
			List<T> attributes = new List<T>();
			object[] objects = type.GetCustomAttributes(typeof (T), inherit);
			foreach (object o in objects)
			{
				attributes.Add((T) o);
			}
			return attributes;
		}
	}
}